package cn.edu.scau.cmi.ema.dao;

import cn.edu.scau.cmi.ema.base.CmiPagination;
import cn.edu.scau.cmi.ema.domain.Event9zwz_copy;
import cn.edu.scau.cmi.ema.util.CmiSqlUtil;
import org.hibernate.Session;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

@Repository("Event9zwz_copyDAO")
@Transactional
public class Event9zwz_copyDAOImpl extends AbstractJpaDao<Event9zwz_copy> implements Event9zwz_copyDAO {

	private final static Set<Class<?>> dataTypes = new HashSet<Class<?>>(
			Arrays.asList(new Class<?>[] { Event9zwz_copy.class }));

	@PersistenceContext()
	private EntityManager entityManager;

	public Event9zwz_copyDAOImpl() {
		super();
	}

	public EntityManager getEntityManager() {
		return entityManager;
	}

	public Set<Class<?>> getTypes() {
		return dataTypes;
	}

	@Transactional
	public Event9zwz_copy findEvent9zwz_copyById(Integer id) throws DataAccessException {

		return findEvent9zwz_copyById(id, -1, -1);
	}

	@Transactional
	public Event9zwz_copy findEvent9zwz_copyById(Integer id, int startResult, int maxRows) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwz_copyById", startResult, maxRows, id);
			return (Event9zwz_copy) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByNumber(String number) throws DataAccessException {

		return findEvent9zwz_copyByNumber(number, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByNumber(String number, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByNumber", startResult, maxRows, number);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByNumberContaining(String number) throws DataAccessException {

		return findEvent9zwz_copyByNumberContaining(number, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByNumberContaining(String number, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByNumberContaining", startResult, maxRows, number);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByName(String name) throws DataAccessException {

		return findEvent9zwz_copyByName(name, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByName(String name, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByName", startResult, maxRows, name);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByNameContaining(String name) throws DataAccessException {

		return findEvent9zwz_copyByNameContaining(name, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByNameContaining(String name, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByNameContaining", startResult, maxRows, name);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFood(String food) throws DataAccessException {

		return findEvent9zwz_copyByFood(food, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFood(String food, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFood", startResult, maxRows, food);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodContaining(String food) throws DataAccessException {

		return findEvent9zwz_copyByFoodContaining(food, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodContaining(String food, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFoodContaining", startResult, maxRows, food);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryear(String discoveryear) throws DataAccessException {

		return findEvent9zwz_copyByDiscoveryear(discoveryear, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryear(String discoveryear, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoveryear", startResult, maxRows, discoveryear);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryearContaining(String discoveryear)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoveryearContaining(discoveryear, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryearContaining(String discoveryear, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoveryearContaining", startResult, maxRows,
				discoveryear);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverymonth(String discoverymonth) throws DataAccessException {

		return findEvent9zwz_copyByDiscoverymonth(discoverymonth, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverymonth(String discoverymonth, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverymonth", startResult, maxRows, discoverymonth);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverymonthContaining(String discoverymonth)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoverymonthContaining(discoverymonth, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverymonthContaining(String discoverymonth, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverymonthContaining", startResult, maxRows,
				discoverymonth);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydetailtime(String discoverydetailtime)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoverydetailtime(discoverydetailtime, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydetailtime(String discoverydetailtime, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverydetailtime", startResult, maxRows,
				discoverydetailtime);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydetailtimeContaining(String discoverydetailtime)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoverydetailtimeContaining(discoverydetailtime, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydetailtimeContaining(String discoverydetailtime,
			int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverydetailtimeContaining", startResult, maxRows,
				discoverydetailtime);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryprovince(String discoveryprovince)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoveryprovince(discoveryprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryprovince(String discoveryprovince, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoveryprovince", startResult, maxRows,
				discoveryprovince);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryprovinceContaining(String discoveryprovince)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoveryprovinceContaining(discoveryprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoveryprovinceContaining(String discoveryprovince,
			int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoveryprovinceContaining", startResult, maxRows,
				discoveryprovince);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydistrict(String discoverydistrict)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoverydistrict(discoverydistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydistrict(String discoverydistrict, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverydistrict", startResult, maxRows,
				discoverydistrict);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydistrictContaining(String discoverydistrict)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoverydistrictContaining(discoverydistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverydistrictContaining(String discoverydistrict,
			int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverydistrictContaining", startResult, maxRows,
				discoverydistrict);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverycounty(String discoverycounty) throws DataAccessException {

		return findEvent9zwz_copyByDiscoverycounty(discoverycounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverycounty(String discoverycounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverycounty", startResult, maxRows, discoverycounty);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverycountyContaining(String discoverycounty)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoverycountyContaining(discoverycounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverycountyContaining(String discoverycounty, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverycountyContaining", startResult, maxRows,
				discoverycounty);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourceprovince(String sourceprovince) throws DataAccessException {

		return findEvent9zwz_copyBySourceprovince(sourceprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourceprovince(String sourceprovince, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySourceprovince", startResult, maxRows, sourceprovince);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourceprovinceContaining(String sourceprovince)
			throws DataAccessException {

		return findEvent9zwz_copyBySourceprovinceContaining(sourceprovince, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourceprovinceContaining(String sourceprovince, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySourceprovinceContaining", startResult, maxRows,
				sourceprovince);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcedistrict(String sourcedistrict) throws DataAccessException {

		return findEvent9zwz_copyBySourcedistrict(sourcedistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcedistrict(String sourcedistrict, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySourcedistrict", startResult, maxRows, sourcedistrict);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcedistrictContaining(String sourcedistrict)
			throws DataAccessException {

		return findEvent9zwz_copyBySourcedistrictContaining(sourcedistrict, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcedistrictContaining(String sourcedistrict, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySourcedistrictContaining", startResult, maxRows,
				sourcedistrict);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcecounty(String sourcecounty) throws DataAccessException {

		return findEvent9zwz_copyBySourcecounty(sourcecounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcecounty(String sourcecounty, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySourcecounty", startResult, maxRows, sourcecounty);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcecountyContaining(String sourcecounty)
			throws DataAccessException {

		return findEvent9zwz_copyBySourcecountyContaining(sourcecounty, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourcecountyContaining(String sourcecounty, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySourcecountyContaining", startResult, maxRows,
				sourcecounty);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySource(String source) throws DataAccessException {

		return findEvent9zwz_copyBySource(source, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySource(String source, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySource", startResult, maxRows, source);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourceContaining(String source) throws DataAccessException {

		return findEvent9zwz_copyBySourceContaining(source, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySourceContaining(String source, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySourceContaining", startResult, maxRows, source);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubjectmaintype(String subjectmaintype) throws DataAccessException {

		return findEvent9zwz_copyBySubjectmaintype(subjectmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubjectmaintype(String subjectmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySubjectmaintype", startResult, maxRows, subjectmaintype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubjectmaintypeContaining(String subjectmaintype)
			throws DataAccessException {

		return findEvent9zwz_copyBySubjectmaintypeContaining(subjectmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubjectmaintypeContaining(String subjectmaintype, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySubjectmaintypeContaining", startResult, maxRows,
				subjectmaintype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubject(String subject) throws DataAccessException {

		return findEvent9zwz_copyBySubject(subject, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubject(String subject, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySubject", startResult, maxRows, subject);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubjectContaining(String subject) throws DataAccessException {

		return findEvent9zwz_copyBySubjectContaining(subject, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyBySubjectContaining(String subject, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyBySubjectContaining", startResult, maxRows, subject);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByLaw(String law) throws DataAccessException {

		return findEvent9zwz_copyByLaw(law, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByLaw(String law, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByLaw", startResult, maxRows, law);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByLawContaining(String law) throws DataAccessException {

		return findEvent9zwz_copyByLawContaining(law, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByLawContaining(String law, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByLawContaining", startResult, maxRows, law);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodmaintype(String foodmaintype) throws DataAccessException {

		return findEvent9zwz_copyByFoodmaintype(foodmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodmaintype(String foodmaintype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFoodmaintype", startResult, maxRows, foodmaintype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodmaintypeContaining(String foodmaintype)
			throws DataAccessException {

		return findEvent9zwz_copyByFoodmaintypeContaining(foodmaintype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodmaintypeContaining(String foodmaintype, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFoodmaintypeContaining", startResult, maxRows,
				foodmaintype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodsubtype(String foodsubtype) throws DataAccessException {

		return findEvent9zwz_copyByFoodsubtype(foodsubtype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodsubtype(String foodsubtype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFoodsubtype", startResult, maxRows, foodsubtype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodsubtypeContaining(String foodsubtype)
			throws DataAccessException {

		return findEvent9zwz_copyByFoodsubtypeContaining(foodsubtype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodsubtypeContaining(String foodsubtype, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFoodsubtypeContaining", startResult, maxRows, foodsubtype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdultertype(String adultertype) throws DataAccessException {

		return findEvent9zwz_copyByAdultertype(adultertype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdultertype(String adultertype, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByAdultertype", startResult, maxRows, adultertype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdultertypeContaining(String adultertype)
			throws DataAccessException {

		return findEvent9zwz_copyByAdultertypeContaining(adultertype, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdultertypeContaining(String adultertype, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByAdultertypeContaining", startResult, maxRows, adultertype);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodbatchfiller(String foodbatchfiller) throws DataAccessException {

		return findEvent9zwz_copyByFoodbatchfiller(foodbatchfiller, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodbatchfiller(String foodbatchfiller, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFoodbatchfiller", startResult, maxRows, foodbatchfiller);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodbatchfillerContaining(String foodbatchfiller)
			throws DataAccessException {

		return findEvent9zwz_copyByFoodbatchfillerContaining(foodbatchfiller, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByFoodbatchfillerContaining(String foodbatchfiller, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByFoodbatchfillerContaining", startResult, maxRows,
				foodbatchfiller);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdulterlink(String adulterlink) throws DataAccessException {

		return findEvent9zwz_copyByAdulterlink(adulterlink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdulterlink(String adulterlink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByAdulterlink", startResult, maxRows, adulterlink);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdulterlinkContaining(String adulterlink)
			throws DataAccessException {

		return findEvent9zwz_copyByAdulterlinkContaining(adulterlink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByAdulterlinkContaining(String adulterlink, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByAdulterlinkContaining", startResult, maxRows, adulterlink);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverylink(String discoverylink) throws DataAccessException {

		return findEvent9zwz_copyByDiscoverylink(discoverylink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverylink(String discoverylink, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverylink", startResult, maxRows, discoverylink);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverylinkContaining(String discoverylink)
			throws DataAccessException {

		return findEvent9zwz_copyByDiscoverylinkContaining(discoverylink, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDiscoverylinkContaining(String discoverylink, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDiscoverylinkContaining", startResult, maxRows,
				discoverylink);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDetectmethod(String detectmethod) throws DataAccessException {

		return findEvent9zwz_copyByDetectmethod(detectmethod, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDetectmethod(String detectmethod, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDetectmethod", startResult, maxRows, detectmethod);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDetectmethodContaining(String detectmethod)
			throws DataAccessException {

		return findEvent9zwz_copyByDetectmethodContaining(detectmethod, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDetectmethodContaining(String detectmethod, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDetectmethodContaining", startResult, maxRows,
				detectmethod);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDescription(String description) throws DataAccessException {

		return findEvent9zwz_copyByDescription(description, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDescription(String description, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDescription", startResult, maxRows, description);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDescriptionContaining(String description)
			throws DataAccessException {

		return findEvent9zwz_copyByDescriptionContaining(description, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByDescriptionContaining(String description, int startResult,
			int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByDescriptionContaining", startResult, maxRows, description);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByEffect(String effect) throws DataAccessException {

		return findEvent9zwz_copyByEffect(effect, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByEffect(String effect, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByEffect", startResult, maxRows, effect);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByEffectContaining(String effect) throws DataAccessException {

		return findEvent9zwz_copyByEffectContaining(effect, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByEffectContaining(String effect, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByEffectContaining", startResult, maxRows, effect);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByUrl(String url) throws DataAccessException {

		return findEvent9zwz_copyByUrl(url, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByUrl(String url, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByUrl", startResult, maxRows, url);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByUrlContaining(String url) throws DataAccessException {

		return findEvent9zwz_copyByUrlContaining(url, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByUrlContaining(String url, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByUrlContaining", startResult, maxRows, url);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByImported(Boolean imported) throws DataAccessException {

		return findEvent9zwz_copyByImported(imported, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByImported(Boolean imported, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByImported", startResult, maxRows, imported);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByIslocked(Boolean islocked) throws DataAccessException {

		return findEvent9zwz_copyByIslocked(islocked, -1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByIslocked(Boolean islocked, int startResult, int maxRows)
			throws DataAccessException {
		Query query = createNamedQuery("findEvent9zwz_copyByIslocked", startResult, maxRows, islocked);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@Transactional
	public Event9zwz_copy findEvent9zwz_copyByPrimaryKey(Integer id) throws DataAccessException {
		return findEvent9zwz_copyByPrimaryKey(id, -1, -1);
	}

	@Transactional
	public Event9zwz_copy findEvent9zwz_copyByPrimaryKey(Integer id, int startResult, int maxRows)
			throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwz_copyByPrimaryKey", startResult, maxRows, id);
			return (Event9zwz_copy) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copysByIds(Set<Integer> ids) throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwz_copysByIds", -1, -1, ids);
			return new HashSet(query.getResultList());
		} catch (NoResultException nre) {
			return null;
		}
	}

	@Transactional
	public Set<Event9zwz_copy> findAllEvent9zwz_copys() throws DataAccessException {

		return findAllEvent9zwz_copys(-1, -1);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findAllEvent9zwz_copys(int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findAllEvent9zwz_copys", startResult, maxRows);
		return new LinkedHashSet<Event9zwz_copy>(query.getResultList());
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copyByCompositeProperities(String sql, int startResult, int maxRows) {
		return new LinkedHashSet<Event9zwz_copy>(createQuery(sql, startResult, maxRows).getResultList());
	}

	@Transactional
	public Set<Event9zwz_copy> findEvent9zwz_copysByDetachedCriteria(CmiPagination page) throws DataAccessException {
		DetachedCriteria detachedCriteria = CmiSqlUtil.createDetachedCriteria(page, Event9zwz_copy.class);
		Session session = (Session) entityManager.getDelegate();
		Set<Event9zwz_copy> event9zwz_copys = new HashSet(detachedCriteria.getExecutableCriteria(session)
				.setFirstResult(page.getSearchBeginCursor()).setMaxResults(page.getPaginationSize()).list());

		return event9zwz_copys;
	}

	@Transactional
	public Event9zwz_copy findEvent9zwz_copyByPhysicalPrimaryKey(String name) throws DataAccessException {
		return findEvent9zwz_copyByPhysicalPrimaryKey(name, -1, -1);
	}

	@Transactional
	public Event9zwz_copy findEvent9zwz_copyByPhysicalPrimaryKey(String name, int startResult, int maxRows)
			throws DataAccessException {
		try {
			Query query = createNamedQuery("findEvent9zwz_copyByPhyscialPrimaryKey", startResult, maxRows, name);
			return (Event9zwz_copy) query.getSingleResult();
		} catch (NoResultException nre) {
			return null;
		}
	}

	public boolean canBeMerged(Event9zwz_copy entity) {
		return true;
	}
}
